package crm.model.teacherPC.net.job;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

import crm.model.NetConst;
import crm.model.teacherPC.net.StudentPC;

public class ForeGroundWindowJob implements Job {
	private final StudentPC pc;
	public ForeGroundWindowJob(StudentPC pc){
		this.pc=pc;
	}
	public Object doing(ObjectInputStream is, ObjectOutputStream os) {
		
		String name = null;
		try {
			os.writeObject(NetConst.WINDOWFOREGROUNDNAME);
			name = (String)is.readObject();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		pc.setForegroundWindowName(name);
		return null;
	}

}
